#include "win_losser.h"
#include <QVBoxLayout>

win_losser::win_losser(bool windanloss1,QWidget *parent)
    : QWidget{parent}
{
    this->winandloss=windanloss1;
    lb = new QLabel;
    bt = new QPushButton("退出");
    QVBoxLayout *vb = new QVBoxLayout;
    vb->addWidget(lb);
    vb->addWidget(bt);
    setLayout(vb);
    QPixmap pix1 = QPixmap(":/img/win.jpg");
    QPixmap pix2 = QPixmap(":/img/loss.jpg");
    if(windanloss1)
    {
        lb->setPixmap(pix1);
    }
    else if(!windanloss1)
    {
        lb->setPixmap(pix2);
    }
    connect(bt,SIGNAL(clicked(bool)),this,SLOT(close()));
}
